<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS优先级</title>
    <style>
        /* 内联样式表 > ID 选择器 > 类选择器 = 伪类选择器 > 标签选择器 */
        
        .test {
            color: red;
        }
        
        div {
            color: pink;
        }
        
        #demo {
            color: #3865ab;
        }
    </style>
</head>

<body>
    <div>它的颜色为pink </div>
    <div class="test" id="demo" style="color: purple">它的颜色为purple</div>
    <div class="test" id="demo">它的颜色为蓝色</div>
    <div class="test">它的颜色为红色</div>

</body>

</html>